package cn.dianZi.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HibernateUtil {
	private static Configuration conf;
	private final static SessionFactory sf;
	static{
		conf = new Configuration().configure();
		sf = conf.buildSessionFactory();
	}
	
	public static Session currentSession() {
		return sf.getCurrentSession();
	}
}
